package com.example.xzs.admin.userlogin.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class UserLogin implements Serializable {
    @ApiModelProperty(value = "用户名",required = true)
    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^.{1,20}$", message = "用户名称必须由1~20个字符组成")
    private String username;
    @ApiModelProperty(value = "密码",required = true)
    @Pattern(regexp = "^.{8,16}$", message = "密码必须由8~16个字符组成")
    @NotBlank(message = "请输入密码")
    private String password;

}
